How to validate if a date indicated as a string belongs to an interval of 2 dates indicated in anoth